#region Copyright & License
/* Tyng.Data
 * Copyright (c) 2007, Paul Tyng, All rights reserved.
 * Code licensed under the BSD License:
 * http://www.opensource.org/licenses/bsd-license.php
 * Downloaded from: http://code.google.com/p/tyngdata/
*/
#endregion

using System;

namespace Tyng.Data
{
	/// <summary>
	/// Interface for object to convert string data from StreamDataReader field to typed value
	/// </summary>
	public interface IFieldConverter
	{
		/// <summary>
		/// Convert string data to typed value
		/// </summary>
		/// <param name="toType">Type to convert to</param>
		/// <param name="data">String data</param>
		/// <returns>Typed value</returns>
		object ConvertFromString(Type toType, string data);
	}
}
